package cn.com.surker.material.service;

import cn.com.surker.material.entity.MainMaterialInventory;
import cn.com.surker.material.entity.MainMaterialInventoryDetail;
import cn.com.surker.spring.RestResultDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* <p>
    * 材料盘存表 服务类
    * </p>
*
* @author admin
* @since 2024-12-05
*/
public interface MaterialInventoryBaseService extends IService<MainMaterialInventory> {

    /**
     * 云端分页查询
     * @param orgId
     * @param today
     * @param searchVal
     * @param startTime
     * @param endTime
     * @return
     */
    IPage findCloudPage(Long orgId, String today, Integer breedType, String searchVal,
                        String startTime, String endTime, Integer offset, Integer limit);

    /**
     * 更新盘存汇总
     * @return
     */
    RestResultDto updateInventory(Long id, Double addWeight, Double handExpend, String remark, String creator);

    /**
     * 更新明细状态
     * @param id
     * @param status
     * @param creator
     * @return
     */
    RestResultDto updateStatus(Long id, Integer status, String creator);

    /**
     * 更新状态
     * @param orgId
     * @param today
     * @param status
     * @param creator
     * @param remark
     * @return
     */
    RestResultDto updateStatus(Long orgId, String today, Integer status, String creator, String remark);

    /**
     * 补收及任务计算
     * @param orgId
     * @param today
     * @param creator
     * @return
     */
    RestResultDto calcInventory(Long orgId, String today, String startTime, String endTime, Integer breedType,
                             String creator);

    /**
     * 审核盘存汇总
     * @param orgId
     * @param today
     * @param creator
     * @param type
     * @return
     */
    RestResultDto examineInventory(Long orgId, String today, String creator, Integer type);

    /**
     * 查询是否已审核
     * @param orgId
     * @param today
     * @return
     */
    Integer findCheck(Long orgId, String today);
}
